package resource

import (
	"context"
	appsv1 "k8s.io/api/apps/v1"
)

type Server interface {
	ListDeploy(ctx context.Context, req *ListDeployRequest) (map[string][]*appsv1.Deployment, error)
	ListWorkload(ctx context.Context, req *ListWorkloadRequest) (*ListWorkloadRespone, error)
	GatherWorkload(ctx context.Context, req *GatherWorkloadRequest) (*ListWorkloadRespone, error)
	ListService(ctx context.Context, req *ListServiceRequest) ([]*ListServiceRespone, error)
	//FromDeployListService(ctx context.Context, req map[string][]*appsv1.Deployment, clientSet *kubernetes.Clientset) ([]*ListServiceRespone, error)
	FromWorkloadGetService(ctx context.Context, req *FromWorkloadGetResourceRequest) ([]*ListServiceRespone, error)
	ListConfigMap(ctx context.Context, req *ListConfigMapRequest) ([]*ListConfigMapResponse, error)
	// FromDeployListConfigMap(ctx context.Context, req map[string][]*appsv1.Deployment, clientSet *kubernetes.Clientset) ([]*ListConfigMapResponse, error)
	FromWorkloadGetConfigMaps(ctx context.Context, req *FromWorkloadGetResourceRequest) ([]*ListConfigMapResponse, error)
	FromWorkloadGetRBAC(ctx context.Context, req *FromWorkloadGetResourceRequest) (*FromWorkloadGetRBACResponse, error)
	FromWorkloadGetPVPVC(ctx context.Context, req *FromWorkloadGetResourceRequest) (*FromWorkloadGetPVPVCResponse, error)
	FromWorkloadGetSecret(ctx context.Context, req *FromWorkloadGetResourceRequest) (*FromWorkloadGetSecretResponse, error)

	CheckNamespace(ctx context.Context, req *CheckNamespaceRequest) (*CheckNamespaceResponse, error)
	CreateNamespace(ctx context.Context, req *CheckNamespaceRequest) error
	CreateResource(ctx context.Context, req *CreateResourceRequest) error
}
